home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / (A)TB / (A)TBM.ADF / Utilities / SuperDuper.doc < prev    next >
Text File  |  1991-05-03  |  24KB  |  500 lines

  1.                               SuperDuper
  2.  
  3.                        ⌐ 1991 Sebastiano Vigna
  4.  
  5.  
  6. SuperDuper is a disk copier/formatter that tries to be to disk
  7. handling what Mostra is to IFF displaying:  a fast, compact,
  8. system-friendly tool which couples speed, features, and some bells
  9. and whistles to make your life easier.
  10.  
  11. By "fast" I mean exactly what you're hoping---blazingly fast.  A disk
  12. is copied and verified in about 99s.  Without verify, the time drops
  13. to 70s.  You can buffer a disk in RAM in 36s, and then making a
  14. verified copy takes 67s, while a non-verified copy takes 37s.  Adding
  15. another destination drive increases verified copy times by 34s, but
  16. doesn't increment non-verified copy times at all (the Amiga can write
  17. and step more than one drive at a time).  Thus, if you really trust
  18. your drives and your media you can make four copies in 37s.  These
  19. timings can vary with the system configuration, the multitasking
  20. overhead, the disposition of the blocks on the surface of the disk,
  21. and the DMA access of the custom chips.
  22.  
  23. Main features:
  24.  
  25.  - SuperDuper copies from/to any combination of Amiga drives.
  26.  
  27.  - SuperDuper has a switchable 880K RAM buffer that allows for any
  28. number of duplications while reading the source disk only once.  The
  29. combination of destination drives can be changed at each pass. If you
  30. haven't enough RAM, but you do have a hard disk, you can create on it
  31. an image file that will act as a buffer.  Also, any kind of virtual
  32. disk is supported for buffering (VD0:, RAD:, FMS:...).
  33.  
  34.  - SuperDuper checksums the RAM buffer. If some badly written program
  35. is trashing your memory, you are alerted. Thus, buffered copies are
  36. as safe as direct copies.
  37.  
  38.  - SuperDuper can allocate a buffer of less than 880K: in this case,
  39. it will use real-time compression in order to do multiple pass copies
  40. with maximum efficiency.  Most disks can be wholly buffered on a 1MB
  41. machine.  You can also make multiple copies with multiple passes.
  42. Copy times are (almost) unaffected.
  43.  
  44.  - SuperDuper will automatically retry tracks which produce a verify
  45. error.  The number of retries is programmable.
  46.  
  47.  - SuperDuper is highly system-friendly---the use of CPU time is
  48. negligible, so you can multitask efficiently.
  49.  
  50.  - SuperDuper has the option of incrementing the creation date of the
  51. copy so AmigaDOS doesn't get confused.  If, however, the option is
  52. switched on and the disk is not an AmigaDOS disk, SuperDuper won't
  53. increment the date.
  54.  
  55.  - SuperDuper is faster than diskcopy---actually it pushes the drives
  56. to their limits.  At the time of this writing, SuperDuper is the
  57. fastest Amiga copier which doesn't tear down the system.
  58.  
  59.  - SuperDuper alerts the user with sound (and optionally voice) about
  60. the operations in progress---so you can really be doing something
  61. else!
  62.  
  63.  - SuperDuper can format both OFS and FFS disks.
  64.  
  65.  - SuperDuper displays a list of the last few disks copied. If you do
  66. a lot of copying, you'll find this feature much more than useful.
  67.  
  68.  - SuperDuper can manage the Amiga drives without help from the
  69. trackdisk.device. Through the supplied utility SDBootInstall, you can
  70. create a boot disk which will keep the system away from your drives,
  71. giving you back more than 30K per unit.  This is very useful when
  72. doing intensive buffered copying on a 1M machine.
  73.  
  74.  - SuperDuper can automatically start any copy or format operation by
  75. monitoring the disks extraction and insertion.
  76.  
  77.  - SuperDuper works under 1.2, 1.3 and 2.0
  78.  
  79.  - SuperDuper has an elapsed time indicator.
  80.  
  81.  - SuperDuper has a beautiful name.  8^)
  82.  
  83. To use SuperDuper, you have simply to double-click on its icon. You
  84. will see five rows of gadgets.  The first one has at most one gadget
  85. selected:  it's the source.  The second one lets you select the
  86. destination drive(s).  The other lines contain option and action
  87. gadgets.
  88.  
  89. Every gadget can be activated via mouse or keyboard.  The first row
  90. can be activated with 0,1,2,3, and the second one with 4,5,6,7.  For
  91. the other gadgets, you can use a capital letter which is usually the
  92. initial, except for FFS ('N') and VDBUF ('U').  As a bonus, you can
  93. use Q or ESC to exit, instead of hitting the close gadget.  Finally,
  94. you can use RETURN instead of G to start a copy/format operation.
  95.  
  96. To make your first copy, simply select in the first line the gadget
  97. for the drive which contains the source floppy, and in the second
  98. line the gadget(s) for the drive(s) containing the destination(s).
  99. Then hit the GO gadget. After some time, the display will flash, a
  100. beep will be generated, and the copy will be finished. The elapsed
  101. time will be shown. Note that a first beep will be generated when the
  102. copy is almost finished, so you have time to prepare yourself.
  103.  
  104.  
  105.                           The action gadgets
  106.  
  107. Three gadgets control SuperDuper's copy/format operations:
  108.  
  109.  - STOP stops any operation.  If pressed while the multi-pass
  110. real-time compression buffer is selected and no operation is in
  111. progress, it will empty the buffer and reset the pass count, thus
  112. allowing you to buffer another source even if the previous one wasn't
  113. finished (see the description of the buffering system).
  114.  
  115.  - INBUF can be used only when a buffer is selected; it fills the
  116. buffer by reading from the source drive.
  117.  
  118.  - GO initiates a copy operation.  If no buffer is selected, the
  119. source is copied to the destination(s).  If a buffer is selected, the
  120. content of the buffer is written on the destination(s).  If FORMAT is
  121. selected, the destination drive(s) are formatted.  The corresponding
  122. gadget remains highlighted to remind you what you're doing.
  123.  
  124. When SuperDuper starts a GO operation which is not a format, it
  125. scrolls up the name list and marks the current drive as "<UNKNOWN>".
  126. This happens because it can't know if the disk is a DOS disk before
  127. reading the track 0.  After less than a second, the track will be
  128. read, and the name will be changed to "<NDOS>" if the disk is not a
  129. DOS disk.  Otherwise, as soon as the track 80 is read (the progress
  130. bar is in the middle) the name of the disk will be displayed (and
  131. spoken, if you switched TALK on).  Beware:  if you are using a
  132. multi-pass buffer, the name of the disk could be unavailable at the
  133. first pass.
  134.  
  135. If SuperDuper finds an error on read or verify, it will retry writing
  136. the track, each time incrementing the first number of the Rtry:Err
  137. indicator.  If after a number of retries specified in the gadget
  138. "Try#" the error remains, SuperDuper will increment the second number
  139. (the error counter) and will continue.  Note that while retrying
  140. SuperDuper can't be stopped:  don't set the "Rtry#" gadget to 99
  141. unless you really know that's what you want to do.
  142.  
  143. The progress bar is drawn in a different color if you're doing an
  144. INBUF operation---so you can be sure you read the new chunk in the
  145. buffer.  Note also that the progress bar is not updated if something
  146. locks the screen (like using menus).  The update is delayed until the
  147. screen is unlocked (thus SuperDuper won't get stuck as will almost
  148. all programs which do any rendering to their windows).
  149.  
  150.  
  151.                            The copy options
  152.  
  153. Four gadgets control the copy/format options.
  154.  
  155.  - VERIFY turns verify on and off (you can also format without
  156. verifying).  However, turning off verify is not recommended.
  157.  
  158.  - DATE toggles on or off the change of the date of an AmigaDOS disk.
  159. This change is necessary so AmigaDOS can distinguish otherwise
  160. identical disks; if two truly identical disks are inserted in the
  161. drives, AmigaDOS gets confused and crashes.  However, if for some
  162. reason you want a "physical" copy, you would turn off this option.
  163. DATE will be ignored for a non-AmigaDOS disk.
  164.  
  165.  - FFS enables the formatting of FFS disks; for copying it is
  166. ignored.
  167.  
  168.  - FORMAT enables formatting. When you hit GO, all destination drives
  169. will be formatted.  To copy again, you must deselect FORMAT by
  170. clicking it again.  If VERIFY is selected, the format process is
  171. verified.
  172.  
  173. The gadget prefixed by "Label:" allows you to choose a name that
  174. SuperDuper will use while formatting.  The name must be chosen before
  175. clicking GO---it is disabled (ghosted) during the formatting.
  176.  
  177.  
  178.                          The buffering system
  179.  
  180. Three gadgets control the full-featured buffering system of
  181. SuperDuper.  Buffering is useful when you have to do a lot of copies:
  182. you read a disk only once, and then you can make as many copies as
  183. you want without rereading it. It also has other uses: if you have to
  184. create distribution disks (for instance for a commercial package) you
  185. can create them using high speed virtual floppies, such as
  186. Commodore's RAD: or Matt Dillon/Jim Cooper's FMS disk. SuperDuper can
  187. then read from those virtual disks and make many copies on floppies
  188. at high speed.
  189.  
  190. Since data integrity is a primary issue, SuperDuper checksums the RAM
  191. buffer.  The possibility of writing a munged track is very low.  A
  192. strict control is also kept on the validity of the buffer---you can't
  193. write by error random data on your disks.
  194.  
  195.  - BUFFER allocates a RAM buffer.  SuperDuper will try to get an 880K
  196. buffer:  if you don't have enough memory, a warning will be issued,
  197. showing the number of buffers allocated (each buffer is 11K) and
  198. warning you that the real-time compression system is activated.
  199. Beware of the fact that many program tend to crash under low-memory
  200. conditions, so if you have 1MB or less you should close everything
  201. you can before hitting BUFFER, and you should possibly also use
  202. KILLSYS.
  203.  
  204. The memory allocated will be used as a buffer to make multiple pass
  205. copies.  If SuperDuper can find 880K, the process is very simple and
  206. uses very little of the CPU, but if (for instance on a 1MB machine)
  207. it's impossible to buffer a whole disk this way, SuperDuper will use
  208. a real-time compression algorithm. As the disk is read in the buffer,
  209. it is compressed in a special format. The gain in size is usually 35%
  210. for empty tracks, 20-30% for text, 15-25% for programs and 5-10% for
  211. IFF ILBM images.  Tracks which can't be compressed are simply stored.
  212. The only disks which can't really be compressed are disks filled with
  213. compressed files, like .lzh or .zoo files, and for the others the
  214. size gain is enough to buffer a whole disk on a 1MB machine.  8^)
  215.  
  216. Of course, the compression overhead eats a lot of CPU power.  The
  217. algorithm has been devised in such a way that compression and
  218. decompression are absolutely real-time, i.e., you will notice no
  219. slowdown.  However, beware of the fact that while doing compression
  220. SuperDuper always fully uses the CPU.  Even moving the mouse can slow
  221. down the operation in progress.  Anyway, if you have all of your
  222. memory allocated for the buffer, it is definitively not a good idea to do anything besides waiting for the copy to finish.
  223.  
  224. A little side-effect of the allocation of all of the available RAM is
  225. that some requester could be turned into an alert, or could even
  226. disappear without waiting for the user to acknowledge it.
  227.  
  228.  - HDBUF creates an 880K file in the current directory of SuperDuper,
  229. and uses this file as a buffer, exactly like BUFFER does with RAM.
  230. Of course you must use it only if you have a hard disk, and you
  231. started SuperDuper from it. The GO operation will be a little slower,
  232. but if you have a good hard disk you should be able to make copies as
  233. fast as with a RAM buffer.
  234.  
  235.  - VDBUF is probably SuperDuper's most esoteric feature.  By typing a
  236. device name in the string gadget near this one, you can select any
  237. device.  The unit number is taken from the gadget with the label
  238. "VD#".  The device you specified will be used as a buffer for your
  239. disks.  SuperDuper expects the device to behave like the
  240. trackdisk.device, namely it must be able to write data at specific
  241. offsets.  The main devices you can use are:
  242.  
  243.  RAD: - the recoverable RAM drive.  Configure it in your mountlist as
  244. a floppy, and you can use it as a buffer.
  245.  FMS: - Matt Dillon/Jim Cooper's virtual floppy-on-hard disk.
  246.  VD0:, etc. - other recoverable, sector-oriented RAM drives
  247.  
  248. The device you specify is checked on opening to see if it has enough
  249. space to contain a full disk.  The check is done simply on the number
  250. of sectors available---if there are enough sectors, and they are
  251. arranged differently than on a floppy, you will be able to use the
  252. device as a buffer, but don't expect AmigaDOS to get anything
  253. meaningful from it.
  254.  
  255. WARNING:  many of these devices are buggy and return NO ERROR on
  256. unsuccessful opening or failed size test.  Some of them in this case
  257. will trash your memory.  Be sure that the device is configured
  258. properly---try first an AmigaDOS command on it.
  259.  
  260. Of course, many people will find incredible ways to use this feature.
  261. For instance, you can send data through the serial.device and write
  262. it directly to a floppy (for techies:  if you want try something like
  263. that, consider that SuperDuper reads 512 bytes on opening to test for
  264. size, and then reads 1760 chunks of 512 bytes, one for each sector,
  265. for every copy.  The sectors are read sequentially as they are
  266. distributed on the disk, so if the device ignores the offset
  267. indication, you can feed it with 880K of a continuous bytes stream.
  268. Buffering is another story though--the offset indication is important
  269. because SuperDuper places the blocks on the device "in the right
  270. place" as soon as it encounters them).
  271.  
  272. A BUFFER or HDBUF is considered non-valid as soon as allocated,
  273. because it will contain random info.  To make it valid, you must read
  274. in a floppy. VDBUF instead starts with the assumption that the buffer
  275. is valid.
  276.  
  277. This mechanism allows you to prepare, for instance, a distribution
  278. disk at high speed in RAD:  or in your hard disk using FMS:, and then
  279. to copy it to floppies directly.
  280.  
  281.  
  282.                       The user interface gadgets
  283.  
  284.  - TALK activates SuperDuper's ability to give its status by voice.
  285. Currently only English is supported.
  286.  
  287.  - AUTO activates automatic operation starting.  SuperDuper will
  288. monitor the disk insertion and ejection. When all destination(s) have
  289. been ejected and re-inserted, a GO operation is started. If FORMAT is
  290. selected, the destination(s) are formatted.  Else, if a buffer is
  291. selected, it is written to the destination(s).  If neither formatting
  292. nor buffering is requested, SuperDuper will monitor the source, too,
  293. and will start a disk-to-disk(s) copy as soon as the source and all
  294. destination(s) have been ejected and re-inserted.
  295.  
  296.  - KILLSYS closes the Workbench, audio, and voice, flushes the memory
  297. and opens a very little screen with only two colors.  This way, the
  298. maximum amount of memory of your system is at your disposal.  If the
  299. Workbench can't be closed for any reason, a warning is issued
  300. (usually some application has a window opened on the Workbench
  301. screen). When you want to get back, hit the gadget again (this time
  302. it will be named RESTORE).  This feature is very powerful if coupled
  303. with SDBootInstall.
  304.  
  305.  
  306.                             SDBootInstall
  307.  
  308. When your system boots up (at power on or after a reset), the
  309. operating system searches for available drives, and creates some
  310. trackdisk.device tasks accordingly.  These tasks take a lot of memory
  311. for their buffers (>30K), but SuperDuper doesn't use them at all,
  312. because it has its internal routines.
  313.  
  314. If you have to do intensive copy work, and you have 1MB of memory or
  315. less, you could find it useful to boot up your system in a special
  316. configuration that will shut down almost all trackdisk.device tasks,
  317. thus freeing a lot of memory.
  318.  
  319. To accomplish this, do as follows:
  320.  
  321. 1) Make a copy of your usual Workbench 1.2 (or greater) disk (from
  322. now on we work on the copy).
  323.  
  324. 2) Delete some programs to make room---preferences, diskcopy and
  325. format are good candidates.
  326.  
  327. 3) Copy SuperDuper on the disk root directory (by dragging its icon
  328. on the disk icon or using the CLI).
  329.  
  330. 4) Edit the startup-sequence of the disk (it's in the "s" directory).
  331. Delete it entirely, and substitute it with
  332.  
  333. SetPatch >NIL:
  334. Run >NIL: <NIL: SD
  335. EndCLI >NIL:
  336.  
  337. If you're under 1.2, don't put in the first line (you don't have a
  338. SetPatch command).
  339.  
  340. 5) Now put the disk in df0:, and run the utility SDBootInstall.  A
  341. special bootblock will be installed on the floppy.  When booting from
  342. it, the operating system (and you) will be able to access only drive
  343. 0---the other ones will be for SuperDuper's use only.  To get back to
  344. normality, a reboot is necessary.  You will gain 3/4K per drive using
  345. this method (for techies:  it is perfectly legal---the bootblock
  346. simply AllocUnit()s the drives with ID>0).
  347.  
  348.  
  349.                       SuperDuper and your system
  350.  
  351. SuperDuper has been written keeping in mind that a good program
  352. doesn't have to eliminate everything from the system in order to work.
  353. The Amiga has a very efficient multitasking kernel which allows for
  354. resource arbitration.
  355.  
  356. When SuperDuper is started, it won't allocate anything from your
  357. system.  As soon as a source/destination gadget is clicked, it will
  358. inhibit all of the drives (so don't select a gadget while reading or
  359. writing to floppies) and then will grab the disk.resource.  Until the
  360. resource is released, *no one else* can access the Amiga drives.
  361. This is necessary in order to avoid unpredictable collisions with the
  362. system or other programs.
  363.  
  364. If you need to temporarily access your drives, you must simply
  365. deselect all SuperDuper source/destination gadgets:  the disk system
  366. will be restarted (it will be re-grabbed on a gadget selection of
  367. course).  Under 1.3 you will have to eject all drives.  This is
  368. necessary because there is no way to tell trackdisk.device that the
  369. head position has changed. For the same reason, when exiting from the
  370. program under 1.3, you will be asked to eject all disks.
  371.  
  372. The CPU use of SuperDuper is almost unnoticeable. You can do anything
  373. else, and you shouldn't notice any slowdown.
  374.  
  375. This however is not true if you use compression.  In this case, not
  376. only the system will be slowed down (a priority 0 task will almost
  377. always be active), but *any* operation (including moving the mouse
  378. pointer) will slow down SuperDuper.
  379.  
  380. Under 2.0 this is not necessary.  Moreover, if you use KillClick (or
  381. any other utility which legally kills drive clicks under 2.0)
  382. SuperDuper won't click empty drives (drive clicking is necessary for
  383. monitoring the disk insertion; using KillClick is good but you must
  384. be sure your drives won't try to move past track 0 if asked to do
  385. so).
  386.  
  387. As I mentioned before, you should avoid running SuperDuper while a 16
  388. color hi-res screen (or a 4-color ECS productivity mode screen) is
  389. displayed.  The video DMA access will interfere with the
  390. disk/CPU/Blitter access to the point that copy times will drop to
  391. incredible values---reading and compressing a disk in the buffer can
  392. take more than 100s.
  393.  
  394.  
  395.                           SuperDuper and you
  396.  
  397. "Well," you could say, "SuperDuper is a great copier---but how can I
  398. trust him for making my copies?  This guy diddles with
  399. hardware---maybe I should use the system DiskCopy command."
  400.  
  401. This is not a good idea.  First of all, SuperDuper is *incredibly*
  402. picky about verifying.  You will get more verify error messages than
  403. with the standard copy commands (for techies:  SuperDuper verifies
  404. also the MFM timing bits, not only the data bits; this means a 200%
  405. efficiency improvement in catching verify errors and generally bad
  406. media).
  407.  
  408. Moreover, the 1.3 trackdisk.device has unpleasant side-effects on
  409. frequently read/written tracks.  These side-effects are cleared when
  410. you do a copy of the disk with SuperDuper (for techies:
  411. trackdisk.device doesn't check for MFM bits being read in correctly,
  412. and doesn't re-MFM the track before writing it; if a MFM timing bit
  413. is read wrong, it will stay wrong forever, possibly causing read
  414. errors; but SuperDuper re-MFMs every track it copies, thus restoring
  415. every MFM timing bit to its correct value).
  416.  
  417. Finally, if you don't like coffee-breaks during your copies, you'd
  418. better use the fastest copier available---namely SuperDuper.
  419.  
  420.  
  421.                       A word on copy protection
  422.  
  423. SuperDuper won't copy protected disks (or if it will it's just a
  424. coincidence).  I do not believe in copy protection.
  425.  
  426. However, SuperDuper will faithfully reproduce checksum errors on the
  427. source disk.  Thus, if you got the typical "Key <n> checksum error"
  428. you can make a copy of the disk before fixing it. SuperDuper won't do
  429. any surgery:  use a good tool (such as DiskSalv or FixDisk) for that.
  430. Avoid DiskDoctor.
  431.  
  432.  
  433.                            Acknowledgments
  434.  
  435. The first person I must thank a thousand times is Dirk Reisig. It was
  436. by means of his suggestions that I sped up SuperDuper to the current,
  437. amazing values. I wrote him a letter which he answered gently with a
  438. long explanation of the optimizations performed by PCopy.  The first
  439. time I read the letter it seemed greek to me, but little by little I
  440. learned all the mysteries of MFM encoding and disk direct hardware
  441. driving.  Moreover, I learned from the source code of TrackSalve the
  442. usage of the blitter for MFM encoding and many other subtle things.
  443. In other words, without the help of Dirk you would have never seen
  444. anything after DFC5.
  445.  
  446. The second guy behind the birth of SuperDuper is Tom Rokicki.  He
  447. pushed me to write a substitute for TurboBackup, and overall
  448. suggested the main thing---that on the Amiga is possible to write
  449. many disks at the same time. Without this trick, you could never do
  450. four non-verified copies in 37s.  Tom also tested all pre-whatever-
  451. greek-letter versions, always giving useful comments...  and risking
  452. the life of his drives 8^).  Moreover, I had time to work on
  453. SuperDuper because the AmigaTeX system is so incredibly efficient I
  454. got a lot of spare time while writing math papers...
  455.  
  456. Last but not least, Randell Jesup at Commodore drove me through the
  457. labyrinth of non-specified-specs, hardware quirks, strange behaviors,
  458. and system esoteric features.  Without his help SuperDuper could
  459. probably work...  but I wouldn't trust it for *my* copies 8^).
  460.  
  461. The name SuperDuper popped up during a rather intensive BIX
  462. discussion.  Many other names were proposed, but in the end I chose
  463. this one---it has symmetry, correctly defines the product and has a
  464. simple shortening (SD).  Thus, a thousand thanks to Kent Kalnasy and
  465. Dave Barrans for suggesting this name.
  466.  
  467. Many features were not my ideas.  An incredible number of BIX users
  468. came up with excellent suggestions, many of which were actually
  469. implemented.  Thanks to them you have support for buffering on any
  470. device (I never use RAD:  nor FMS:, so I didn't think it could be
  471. useful).  Moreover, Kenneth Pak-kin Wong provided the basic materials
  472. for the icon.
  473.  
  474. But, as always, the biggest *thanks* goes to the beta-testers of
  475. SuperDuper:  Dennis Atkin, Vittorio Calzolari, Jim Cooper, Doug
  476. Erdely, Charlie Fair, Blaine Gardner, Robert Jenks, John Jones, Kent
  477. Kalnasy, Robert Kesterson, Paul King, Randy Menzer, Linda Munson, Tom
  478. Rokicki, Sergio Ruocco, Reinhard Spisser, Jeff Todd, Carlo
  479. Todeschini, Michael Scott Velez and Marco Zandonasi. Beta-testing a
  480. copier is different from anything else---if it doesn't work you won't
  481. get a marginally corrupted picture on your display: rather, the Fish
  482. Disks it took an hour to copy could be unusable. A special kind of
  483. patience is needed under these conditions 8^).
  484.  
  485.  
  486.  
  487. This program is copyrighted, but freely distributable.  This software
  488. is made available on an as-is basis; don't come to me if you destroy
  489. your entire Fish Disk library with it!  Of course, it was tested
  490. rather extensively before it was released...
  491.  
  492. Comments, complaints, desiderata are welcome.
  493.  
  494.  
  495.     Sebastiano Vigna
  496.     BIX: svigna
  497.     UUCP: ...{uunet|piramid|rutgers}!cbmvax!cbmehq!cbmita!sebamiga!seba
  498.     Via Valparaiso, 18
  499.     I-20144 Milano ITALY
  500.